package com.xjl.design.pattern.structural.decorator.v1;

public class Test {

    public static void main(String[] args) {
        Bettercake bettercake = new Bettercake();
        System.out.println(bettercake.getDesc() + "  销售价格：" + bettercake.cost());

        BettercakeWithEgg bettercakeWithEgg = new BettercakeWithEgg();
        System.out.println(bettercakeWithEgg.getDesc() + "   销售价格：" + bettercakeWithEgg.cost());

        BettercakeWithEggSausage bettercakeWithEggSausage = new BettercakeWithEggSausage();
        System.out.println(bettercakeWithEggSausage.getDesc() + "   销售价格：" + bettercakeWithEggSausage.cost());
    }
}
